package com.baseframe.oss.sign;

import lombok.Getter;

@Getter
public enum OssType {
    UNKNOWN(0,"未知"),
    ALI(1,"阿里云"),
    TENCENT(2,"腾讯云")

    ;


    OssType(int code, String name) {
        this.code = code;
        this.name = name;
    }

    private final int code;
    private final String name;

    public static OssType getOssType(int code){
        for(OssType o:OssType.values()) {
            if (o.code == code) {
                return o;
            }
        }

        return  UNKNOWN;
    }


}
